package com.wen.sms.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author：Win
 * @Date: 2021/6/14 11:55
 * @Description:
 */
@Component
public class SmsProperties implements InitializingBean {
    @Value("${sms.host}")
    private String host;

    @Value("${sms.path}")
    private String path;

    @Value("${sms.method}")
    private String method;

    @Value("${sms.appcode}")
    private String appcode;

    @Value("${sms.tpl_id}")
    private String tpl_id;

    public static String HOST;
    public static String PATH;
    public static String METHOD;
    public static String APPCODE;
    public static String TPL_ID;

    @Override
    public void afterPropertiesSet() {
        HOST = host;
        PATH = path;
        METHOD = method;
        APPCODE = appcode;
        TPL_ID = tpl_id;
    }
}
